package com.example.Wisdompark.service;

import com.example.Wisdompark.dao.OutOrderMapper;
import com.example.Wisdompark.pojo.Out_Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

@Repository
public class OutOrderImpl implements OutOrderService{

    @Autowired
    private OutOrderMapper outOrderMapper;
    @Override
    public List<Out_Order> queryAllOrder() {
        return outOrderMapper.queryAllOrder();
    }

    @Override
    public int insertAOrder(Out_Order out_order) {
        return outOrderMapper.insertAOrder(out_order);
    }

    @Override
    public int delAOrder(String order_num) {
        return outOrderMapper.delAOrder(order_num);
    }

    @Override
    public int updateAOrder(Out_Order out_order) {
        return outOrderMapper.updateAOrder(out_order);
    }

    @Override
    public Out_Order queryByOrderNum(String order_num) {

        return outOrderMapper.queryByOrderNum(order_num);
    }

    @Override
    public int updateOrderState(String order_num, int state) {
        return outOrderMapper.updateOrderState(order_num,state);
    }

    @Override
    public List<Out_Order> queryOrderByState(Integer state) {
        return outOrderMapper.queryOrderByState(state);
    }
}
